#ifndef __IBM_MODEL1__
#define __IBM_MODEL1__

#include "Model.hh"

class IBMModel1 : Model{
public:
  void transfer(Bitext &, Model *);
  string get_model_name(){
    return "IBMModel1";
  }
  void iterate(Bitext &);
  void update_em(Bitext &, Model *);

private:
  double viterbi_inner(SentencePair &, bool);
  void get_raw_expected_counts(Bitext &, SentencePair &, ExpectedCounts &);

  double smoothed_p_s_given_t(int, int);
  map<int, map<int, double> > p_J_given_I;
  map<int, map<int, double> > p_s_given_t;
};

#endif
